/*
 Navicat Premium Data Transfer

 Source Server         : uiste
 Source Server Type    : MySQL
 Source Server Version : 50542
 Source Host           : localhost
 Source Database       : manjie

 Target Server Type    : MySQL
 Target Server Version : 50542
 File Encoding         : utf-8

 Date: 10/15/2017 13:35:22 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `migration`
-- ----------------------------
DROP TABLE IF EXISTS `migration`;
CREATE TABLE `migration` (
  `version` varchar(180) NOT NULL,
  `apply_time` int(11) DEFAULT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- ----------------------------
--  Records of `migration`
-- ----------------------------
BEGIN;
INSERT INTO `migration` VALUES ('m000000_000000_base', '1506254608'), ('m130524_201442_init', '1506254627');
COMMIT;

-- ----------------------------
--  Table structure for `mj_admin`
-- ----------------------------
DROP TABLE IF EXISTS `mj_admin`;
CREATE TABLE `mj_admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '10',
  `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT '' COMMENT '家庭住址',
  `mobile` varchar(25) COLLATE utf8_unicode_ci DEFAULT '' COMMENT '手机号',
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `password_reset_token` (`password_reset_token`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `mj_admin`
-- ----------------------------
BEGIN;
INSERT INTO `mj_admin` VALUES ('1', 'admin', 'b6YXmyr-4GqrI9DrZOljKCBgPKLWJpMe', '$2y$13$As5rnDoU9a7KMPSOr/kB6O4Ysz5ZbvQlUac9EarpBMV4H.BUNnEzi', null, '798407452@qq.com', '10', '上海市杨浦区五角场街道', '17621231687', '1506254663', '1506254663');
COMMIT;

-- ----------------------------
--  Table structure for `mj_user`
-- ----------------------------
DROP TABLE IF EXISTS `mj_user`;
CREATE TABLE `mj_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `status` smallint(6) NOT NULL DEFAULT '10',
  `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT '' COMMENT '家庭住址',
  `mobile` varchar(25) COLLATE utf8_unicode_ci DEFAULT '' COMMENT '手机号',
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `email` (`email`),
  UNIQUE KEY `password_reset_token` (`password_reset_token`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Records of `mj_user`
-- ----------------------------
BEGIN;
INSERT INTO `mj_user` VALUES ('1', 'uiste', 'b6YXmyr-4GqrI9DrZOljKCBgPKLWJpMe', '$2y$13$As5rnDoU9a7KMPSOr/kB6O4Ysz5ZbvQlUac9EarpBMV4H.BUNnEzi', null, '798407452@qq.com', '10', '上海市杨浦区五角场街道', '17621231687', '1506254663', '1506254663');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;

-- ----------------------------
-- Table structure for mj_category
-- ----------------------------
DROP TABLE IF EXISTS `mj_category`;
CREATE TABLE `mj_category` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `category` varchar(255) DEFAULT '' COMMENT '类型名',
  `desc` varchar(255) DEFAULT '' COMMENT '类型描述',
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for mj_msgs
-- ----------------------------
DROP TABLE IF EXISTS `mj_msgs`;
CREATE TABLE `mj_msgs` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `sender` int(11) DEFAULT '0' COMMENT '发送者',
  `receiver` int(11) DEFAULT '0' COMMENT '接收者',
  `type` tinyint(4) DEFAULT '0' COMMENT '0:普通信息，1:系统信息',
  `content` text COMMENT '消息内容',
  `send_time` int(11) DEFAULT '0' COMMENT '发送时间',
  `read_time` int(11) DEFAULT '0' COMMENT '阅读时间',
  `status` tinyint(4) DEFAULT '0' COMMENT '0:未读，1:已读',
  `created_at` int(11) DEFAULT '0' COMMENT '创建时间',
  `updated_at` int(11) DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for mj_painting
-- ----------------------------
DROP TABLE IF EXISTS `mj_painting`;
CREATE TABLE `mj_painting` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `category_id` tinyint(4) unsigned DEFAULT '0' COMMENT '类别:0.未分类',
  `user_id` int(11) DEFAULT '0' COMMENT '用户ID',
  `image` varchar(255) DEFAULT NULL COMMENT '图片地址',
  `thumb` varchar(255) DEFAULT NULL,
  `title` varchar(255) DEFAULT '' COMMENT '图片title',
  `describe` text COMMENT '图片描述',
  `status` tinyint(4) DEFAULT '1' COMMENT '0:回收站，1:显示',
  `show_banner` tinyint(4) DEFAULT '0' COMMENT '是否banner展示：0:不展示,1:展示',
  `created_at` int(11) unsigned DEFAULT '0' COMMENT '创建时间',
  `updated_at` int(11) DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
